home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / lists / mint / l_1199 / 1794 < prev    next >
Encoding:
Internet Message Format  |  1994-08-27  |  1022 b 

  1. Date: Mon, 1 Aug 1994 08:57:35 +0200
  2. From: Richard Huveneers <huveneer@math.ruu.nl>
  3. Message-Id: <199408010657.AA15451@hieper.math.ruu.nl>
  4. To: mint@atari.archive.umich.edu
  5. Subject: Mint bug & patch
  6.  
  7.  
  8. Hi all,
  9.  
  10. yesterday I discovered a bug in Mint, resulting in incorrect return values of
  11. read() and write() calls to certain terminals.
  12. Actually I had a program trying to write 15 bytes to /dev/aux, which were
  13. transmitted ok, but Mint returned having written 0 bytes, so my program trying
  14. again and again and agian...
  15.  
  16. Here's a patch to cure the problem,
  17.  
  18. Richard.
  19.  
  20. *** tty.c.orig  Sun Jul 31 16:49:24 1994
  21. --- tty.c       Sun Jul 31 18:32:38 1994
  22. ***************
  23. *** 129,134 ****
  24. --- 129,135 ----
  25.         return bytes_read;
  26.   #endif
  27.  
  28. +       bytes_read = 0;         /* Re-initialize in case of EUNDEV */
  29.     ptr = buf;
  30.  
  31.     while (bytes_read < nbytes) {
  32. ***************
  33. *** 389,394 ****
  34. --- 390,396 ----
  35.    */
  36.  
  37.  
  38. +       bytes_written = 0;      /* Re-initialize in case of EUNDEV */
  39.     if (nbytes == 0) return bytes_written;
  40.     c = *ptr++;
  41.  
  42.